{include file="public/head"/}
<div class="container-fluid" id="main">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="alert alert-dismissable alert-info" id="headeralert">
                <button type="button" class="close" data-dismiss="alert">×</button>
                <p></p>
            </div>
        </div>
    </div>
    <!--国家id和公司id 联系人和银行的添加从这里获取-->
    <input type="hidden" name="company_id" id="company_id" value="{$company_id|default=''}">
    <input type="hidden" name="country_id" id="country_id" value="{$country_id|default=''}">

    <div class="ntDesktop">
        <div class="ntDesktop-head">客户公司（{$companyname}）资料</div>

        <div class="row clearfix" style="padding-top:0px">
            <div class="col-md-8 col-sm-8">
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active" @click="getdata('detail','details')">
                        <a href="#table-info" role="tab" aria-controls="tab-info" data-toggle="tab">{:strtoupper(lang('more_information'))}</a>
                    </li>
                    <li role="presentation" @click="getdata('link','linkarr')">
                        <a href="#table-linkman" role="tab" aria-controls="tab-linkman" data-toggle="tab">{:strtoupper(lang('contact'))}</a>
                    </li>
                    <li role="presentation" @click="getdata('bank','bankarr')">
                        <a href="#table-bank" role="tab" aria-controls="tab-bank" data-toggle="tab">{:strtoupper(lang('bank_account'))}</a>
                    </li>
                    <li><a href="#co-branch" data-toggle="tab" @click="getdata('branch','brancharr')">分公司</a></li>
                    <li><a href="#co-evaluate" data-toggle="tab" @click="getdata('evaluate','evaluatearr')">风评</a></li>
                    <li><a href="#co-sale-info" data-toggle="tab" @click="getdata('information','information')">销售资料</a>
                    </li>
                    <li><a href="#co-buy" data-toggle="tab" @click="getdatapage('buyplan','buyplanpage','pageSize')">采购订单</a>
                    </li>
                    <li><a href="#co-sale" data-toggle="tab" @click="getdatapage('sale','salepage','saleSize')">销售订单</a></li>
                    <li role="presentation">
                        <a href="#co-finance" role="tab" aria-controls="tab-finance" data-toggle="tab">{:strtoupper(lang('financial_flow'))}</a>
                    </li>
                    <li role="presentation">
                        <a href="#co-log" role="tab" aria-controls="tab-log" data-toggle="tab">{:strtoupper(lang('operation_subscription'))}</a>
                    </li>

                    <!--<li  role="presentation">-->
                    <!--<a href="#table-order" role="tab" aria-controls="tab-order" data-toggle="tab">{:strtoupper(lang('order_list'))}</a>-->
                    <!--</li>-->


                </ul>
            </div>
            <div class="col-md-4 col-sm-4 text-right">
                <div>
                    <button type="button" class="btn btn-default" @click="returnlist"><span
                            class="glyphicon glyphicon-chevron-left"></span>{:strtoupper(lang('back_to_list'))}
                    </button>
                    <span style="padding:10px">&nbsp;</span>
                    <a href="companyedit?company_id={$company_id}" class="btn btn-primary"
                       style="padding-left:48px;padding-right:48px;"> <span
                            class="glyphicon glyphicon-pencil"></span>{:strtoupper(lang('edit'))} </a>
                </div>
            </div>
        </div>

        <div class="tab-content">
            <!-- 详细资料 页面 -->
            <div role="tabpanel" class="tab-pane active" id="table-info">
                <!-- 详细资料页面 -->
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <table class="table table-striped table-hover ntTable" v-cloak>
                            <tbody>
                            <tr>
                                <td>{:strtoupper(lang('company_type'))}</td>
                                <td>{{details.cotypename}}</td>
                                <td>{:strtoupper(lang('belongs_to_seller'))}</td>
                                <td>{{details.managename}}</td>
                            </tr>
                            <tr>
                                <td>{:strtoupper(lang('company_name'))}</td>
                                <td colspan="3">{{details.name}}</td>
                            </tr>
                            <tr>
                                <td>{:strtoupper(lang('address'))}</td>
                                <td colspan="3">{{details.address}}</td>
                            </tr>
                            <tr>
                                <td>{:strtoupper(lang('ZIP_CODE'))}</td>
                                <td>{{details.zipcode}}</td>
                                <td>{:strtoupper(lang('status'))}</td>
                                <td>{{details.status}}</td>
                            </tr>
                            <tr>
                                <td>{:strtoupper(lang('add'))}</td>
                                <td>{{details.createname}}</td>
                                <td>{:strtoupper(lang('add_time'))}</td>
                                <td>{{details.create_date}}</td>
                            </tr>
                            <tr>
                                <td>{:strtoupper(lang('update'))}</td>
                                <td>{{details.updatename}}</td>
                                <td>{:strtoupper(lang('update_time'))}</td>
                                <td>{{details.update_date}}</td>
                            </tr>
                            </tbody>
                        </table>
                        <table class="table table-striped table-hover ntTable">
                            <tbody>
                            <tr>
                                <td>{:strtoupper(lang('number_of_employees'))}</td>
                                <td>{{details.worksnum}}</td>
                            </tr>
                            <tr>
                                <td>{:strtoupper(lang('remark'))}</td>
                                <td>{{details.remarks}}</td>
                            </tr>
                            <tr>
                                <td>营业号</td>
                                <td>{{details.regno}}</td>
                            </tr>
                            <tr>
                                <td>税号</td>
                                <td>{{details.taxno}}</td>
                            </tr>
                            <tr v-for="(itemtext,index) in details.textdata">
                                <td>{{itemtext.key}}</td>
                                <td>{{itemtext.val}}</td>
                            </tr>
                            <tr v-for="(itemselect,index) in details.selectdata">
                                <td>{{itemselect.key}}</td>
                                <td>{{itemselect.val}}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!-- 公司联系人 页面 -->
            <div role="tabpanel" class="tab-pane" id="table-linkman">
                <!-- 联系人页面 -->
                <div>
                    <div class="row clearfix">
                        <div class="col-md-12 column text-right">
                            <button @click="addlinkman" type="button" class="btn btn-primary" data-toggle="modal"
                                    data-target="#linkman_Modal"><span
                                    class="glyphicon glyphicon-plus"></span> {:strtoupper(lang('add_new_contact'))}
                            </button>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <table class="table table-striped table-hover ntTable" v-cloak>
                                <thead>
                                <tr>
                                    <th>{:strtoupper(lang('serial_number'))}</th>
                                    <th>{:strtoupper(lang('name'))}</th>
                                    <th>{:strtoupper(lang('main'))}</th>
                                    <th>{:strtoupper(lang('gender'))}</th>
                                    <th>{:strtoupper(lang('contact_information'))}</th>
                                    <th>{:strtoupper(lang('edit'))}</th>
                                    <th>{:strtoupper(lang('operate'))}</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr v-for="(item,index) in linkarr">
                                    <td align="center">{{formatUnit(index+1,'ID')}}</td>
                                    <td>{{item.name}}</td>
                                    <td align="center">{{item.is_main==1?'Y':'N'}}</td>
                                    <td align="center">{{item.sexman}}</td>
                                    <td class="contact">
                                        <div v-for="linkmrth in item.linkarr" :key="linkmrth.id">
                                            <span>{{linkmrth.linkname+'：'+linkmrth.content}}</span>
                                        </div>
                                    </td>
                                    <td> {{item.updatename}}<br/>
                                        <small>{{item.update_date}}</small>
                                    </td>
                                    <td class="text-right">
                                        <div>
                                            <button @click="editlinkman(index)" type="button"
                                                    class="btn btn-sm btn-primary"
                                                    data-toggle="modal"
                                                    data-target="#linkman_Modal"><span
                                                    class="glyphicon glyphicon-pencil"></span>{:strtoupper(lang('edit'))}
                                            </button>
                                            <button @click="deldata(item.id, index, 1)" type="button"
                                                    class="btn btn-sm btn-default"><span
                                                    class="glyphicon glyphicon-trash"></span>{:strtoupper(lang('delete'))}
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                                <tr style="text-align: center;" v-if="linkarr.length==0">
                                    <td colspan="7" class="no_date">{:strtoupper(lang('no_data'))}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 公司账号 页面 -->
            <div role="tabpanel" class="tab-pane" id="table-bank">
                <!-- 银行账号页面 -->
                <div>
                    <div class="row clearfix">
                        <div class="col-md-12 column text-right">
                            <button @click="addbank" type="button" class="btn btn-primary" data-toggle="modal"
                                    data-target="#bank_Modal"><span
                                    class="glyphicon glyphicon-plus"></span> {:strtoupper(lang('add_new_account'))}
                            </button>
                        </div>
                    </div>
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <table class="table table-striped table-hover ntTable" v-cloak>
                                <thead>
                                <tr>
                                    <th>No.</th>
                                    <th>{:strtoupper(lang('bank'))}</th>
                                    <th>{:strtoupper(lang('account_opening_bank_branch'))}</th>
                                    <th>{:strtoupper(lang('account_name'))}</th>
                                    <th>{:strtoupper(lang('account'))}</th>
                                    <th>{:strtoupper(lang('main'))}</th>
                                    <th>{:strtoupper(lang('edit'))}</th>
                                    <th>{:strtoupper(lang('operate'))}</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr v-for="(item,index) in bankarr">
                                    <td align="center">{{formatUnit(index+1,'ID')}}</td>
                                    <td>{{item.name}}</td>
                                    <td>{{item.bankname}}</td>
                                    <td>{{item.account_name}}</td>
                                    <td>{{item.account_num}}</td>
                                    <td align="center">{{item.is_main==1?'Y':'N'}}</td>
                                    <td>{{item.updatename}}<br/>
                                        <small>{{item.update_date}}</small>
                                    </td>
                                    <td class="text-right">
                                        <div>
                                            <button @click="editbank(index)" type="button"
                                                    class="btn btn-sm btn-primary"
                                                    data-toggle="modal"
                                                    data-target="#bank_Modal"><span
                                                    class="glyphicon glyphicon-pencil"></span>编辑
                                            </button>
                                            <button @click="deldata(item.id, index, 2)" type="button"
                                                    class="btn btn-sm btn-default"><span
                                                    class="glyphicon glyphicon-trash"></span>删除
                                            </button>
                                        </div>
                                    </td>
                                <tr style="text-align: center;" v-if="bankarr.length==0">
                                    <td colspan="8" class="no_date">{:strtoupper(lang('no_data'))}</td>
                                </tr>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 分公司 页面 -->
            <div class="tab-pane" id="co-branch">
                <div class="row">
                    <div class="col-md-12 text-right">
                        <button @click="addbranch" type="button" class="btn btn-primary" data-toggle="modal"
                                data-target="#branch_editModal">
                            <span class="fa fa-plus"> 添加新的分公司 </span></button>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-striped table-hover ntTable" v-cloak>
                            <thead>
                            <tr>
                                <th>#</th>
                                <th>名称</th>
                                <th>锁定</th>
                                <th>地址</th>
                                <th>员工</th>
                                <th>营业号</th>
                                <th>税号</th>
                                <th>编辑</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr v-for="(item,index) in brancharr">
                                <td align="center">{{formatUnit(index+1,'ID')}}</td>
                                <td>{{item.name}}</td>
                                <td align="center">{{item.lock==1?'Y':'N'}}</td>
                                <td>{{item.addr}}, <br>{{item.address}}</td>
                                <td>{{item.worksnum}}</td>
                                <td>{{item.regno}}</td>
                                <td>{{item.taxno}}</td>
                                <td> {{item.updatename}}<br/>
                                    <small>{{item.update_date}}</small>
                                </td>
                                <td align="right">
                                    <button @click="editbranch(index)" type="button" class="btn btn-sm btn-primary"
                                            data-toggle="modal"
                                            data-target="#branch_editModal"><span
                                            class="glyphicon glyphicon-pencil"></span>编辑
                                    </button>
                                    <button type="button" @click="deldata(item.id, index, 3)"
                                            class="btn btn-sm btn-default"><span
                                            class="glyphicon glyphicon-trash"></span>{:strtoupper(lang('delete'))}
                                    </button>
                                </td>
                            </tr>
                            <tr style="text-align: center;" v-if="brancharr.length==0">
                                <td colspan="9" class="no_date">{:strtoupper(lang('no_data'))}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!-- 风评 页面 -->
            <div class="tab-pane" id="co-evaluate">
                <div class="row">
                    <div class="col-md-12 text-right">
                        <button type="button" @click="addevaluate" class="btn btn-primary" data-toggle="modal"
                                data-target="#co_evaluate_Modal">
                            <span class="fa fa-plus"> 添加风评 </span></button>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <table class="table table-striped table-hover ntTable">
                            <thead>
                            <tr>
                                <td>#</td>
                                <td>留言</td>
                                <td>得分</td>
                                <td>编辑</td>
                                <td>操作</td>
                            </tr>
                            </thead>
                            <tbody>
                            <tr v-for="(item,index) in evaluatearr">
                                <td align="center">{{formatUnit(index+1,'ID')}}</td>
                                <td>{{item.comment}}</td>
                                <td align="right">{{item.score}}</td>
                                <td>{{item.updatename}} / {{item.update_date}}</td>
                                <td align="right">
                                    <button @click="editevaluate(index)" type="button" class="btn btn-sm btn-primary"
                                            data-toggle="modal" data-target="#co_evaluate_Modal"><span
                                            class="glyphicon glyphicon-pencil"></span>编辑
                                    </button>
                                    <button @click="deldata(item.id, index, 4)" type="button"
                                            class="btn btn-sm btn-default"><span
                                            class="glyphicon glyphicon-trash"></span>{:strtoupper(lang('delete'))}
                                    </button>
                                </td>
                            </tr>
                            <tr style="text-align: center;" v-if="evaluatearr.length==0">
                                <td colspan="5" class="no_date">{:strtoupper(lang('no_data'))}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!-- 销售资料 页面 -->
            <div class="tab-pane" id="co-sale-info">
                <div class="row">
                    <div class="col-md-12 text-right">
                        {in name="378" value="$Think.session.admin.auth_ids"}
                        <button @click="getadjust" class="btn btn-primary" data-toggle="modal"
                                data-target="#co_sale_settingModal">调整
                        </button>
                        {/in}
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-6">
                        <table class="table">
                            <tbody>
                            <tr>
                                <td>级别</td>
                                <td>{{information.level}}</td>
                                <td>排名</td>
                                <td>{{information.rank_1m}}/{{information.rank}}</td>
                            </tr>
                            <tr>
                                <td>默认送货类型</td>
                                <td>{{information.delivertype}}</td>
                                <td>支付类型</td>
                                <td>{{information.payname}}</td>
                            </tr>
                            <tr>
                                <td>订单额度</td>
                                <td>{{formatUnit(information.credit4order,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                                <td>管理员授权额度</td>
                                <td>{{formatUnit(information.credit4admin,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                            </tr>
                            <tr>
                                <td>平均支付天数</td>
                                <td>{{information.pay_days>0?information.pay_days:'-'}}
                                    <small class="unit">DAYS</small>
                                </td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td>月成长</td>
                                <td>{{formatUnit(information.mongrow*100,'%')}}
                                    <small class="unit">%</small>
                                </td>
                                <td>年成长</td>
                                <td>{{formatUnit(information.mongrows*100,'%')}}
                                    <small class="unit">%</small>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    <div class="col-md-4">
                                        <span class="label label-success">{{information.pledge==1?'YES':'NO'}}</span>
                                        必须支付定金
                                    </div>
                                    <div class="col-md-4">
                                        <span class="label label-default">{{information.makefirst==1?'YES':'NO'}}</span>
                                        允许先配货后结算
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="col-md-6">
                        <table class="table table-hover ntTable">
                            <thead>
                            <tr>
                                <th>#</th>
                                <th>订单数</th>
                                <th>销售额</th>
                                <th>故障</th>
                                <th>故障金额</th>
                                <th>故障率</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>当月</td>
                                <td align="right">{{information.sale_qtyone}}
                                    <small class="unit">T</small>
                                </td>
                                <td align="right">{{formatUnit(information.paid_totalone,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                                <td align="right">{{information.troubleone}}
                                    <small class="unit">T</small>
                                </td>
                                <td align="right">{{formatUnit(information.trouble_valueone,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                                <td align="right">
                                    {{formatUnit(information.troubleone/information.trouble_valueone*100,'%')}}
                                    <small class="unit">%</small>
                                </td>
                            </tr>
                            <tr>
                                <td>上月</td>
                                <td align="right">{{information.sale_qtytwo}}
                                    <small class="unit">T</small>
                                </td>
                                <td align="right">{{formatUnit(information.paid_totaltwo,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                                <td align="right">{{information.troubletwo}}
                                    <small class="unit">T</small>
                                </td>
                                <td align="right">{{formatUnit(information.trouble_valuetwo,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                                <td align="right">
                                    {{formatUnit(information.troubletwo/information.trouble_valuetwo*100,'%')}}
                                    <small class="unit">%</small>
                                </td>
                            </tr>
                            <tr>
                                <td>三月</td>
                                <td align="right">{{information.sale_qty_3m}}
                                    <small class="unit">T</small>
                                </td>
                                <td align="right">{{formatUnit(information.sale_total_3m,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                                <td align="right">{{information.trouble_3m}}
                                    <small class="unit">T</small>
                                </td>
                                <td align="right">{{formatUnit(information.trouble_value_3m,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                                <td align="right">
                                    {{formatUnit(information.trouble_3m/information.trouble_value_3m*100,'%')}}
                                    <small class="unit">%</small>
                                </td>
                            </tr>
                            <tr>
                                <td>一年</td>
                                <td align="right">{{information.sale_qty_1y}}
                                    <small class="unit">T</small>
                                </td>
                                <td align="right">{{formatUnit(information.sale_total_1y,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                                <td align="right">{{information.trouble_1y}}
                                    <small class="unit">T</small>
                                </td>
                                <td align="right">{{formatUnit(information.trouble_value_1y,'BRL')}}
                                    <small class="unit">BRL</small>
                                </td>
                                <td align="right">
                                    {{formatUnit(information.trouble_1y/information.trouble_value_1y*100,'%')}}
                                    <small class="unit">%</small>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-12" style="padding:2rem 5rem">
                        <div id="sale-charts" style="width: 800px; height:400px">
                        </div>
                    </div>
                </div>
            </div>
            <!-- 采购订单页面 -->
            <div class="row tab-pane" id="co-buy" style="padding-top: 1rem">
                <div class="col-md-6">
                    <ul id="main_tab" class="nav nav-tabs">
                        <li class="active" @click="getdatapage('buyplan','buyplanpage','pageSize')">
                            <a href="#co-buy-pro" data-toggle="tab">产品</a>
                        </li>
                        <li @click="getdatapage('buylist','buylistpage','pageSize')">
                            <a href="#co-buy-list" data-toggle="tab">合同</a>
                        </li>
                    </ul>
                </div>
                <div class="col-md-6 text-right">
                    <button class="btn btn-default btn-checkbox">
                        <input type="checkbox">
                        显示超过1年的内容
                    </button>
                </div>
                <div class="tab-content">
                    <div class="col-md-12 tab-pane active" id="co-buy-pro">
                        <table class="table table-striped table-hover ntTable">
                            <thead>
                            <tr>
                                <th>#</th>
                                <th>产品</th>
                                <th>箱规</th>
                                <th class="sorting">订单量</th>
                                <th class="sorting">最后下单日期</th>
                                <th>最后下单价格</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr v-for="(item,index) in buyplan">
                                <td align="center">{{formatUnit(item.id,'ID')}}</td>
                                <td>
                                    <div class="pro">
                                        <div class="pro-icon">
                                            <img :src="item.prodata.img_url" border="0" width="48px"
                                                 height="48px">
                                        </div>
                                        <div class="pro-name">
                                            <small> {{formatUnit(item.prodata.prochar_id,'ID') +
                                                (item.prodata.brand_name ? ' / '+item.prodata.brand_name :'')+
                                                (item.prodata.model ? ' / '+item.prodata.model :'')}}
                                            </small>
                                            <br>
                                            {{item.prodata.pro_name}}
                                        </div>
                                    </div>
                                </td>
                                <td align="right">
                                    {{item.prodata.prochar_qty}}
                                    <small class="unit">PCS/CTN</small>
                                    | {{formatUnit(item.prodata.ctn_kgs,'KGS')}}
                                    <small class="unit">KGS/CTN</small>
                                    <br>
                                    {{item.prodata.ctn_size}}
                                    <small class="unit">CM</small>
                                    | {{formatUnit(item.prodata.ctn_m3,'CBM')}}
                                    <small class="unit">CBM</small>
                                </td>
                                <td align="right">{{formatUnit(item.pronum,'PCS')}}
                                    <small class="unit">PCS</small>
                                </td>
                                <td>{{item.create_date}}</td>
                                <td align="right">{{formatUnit(item.price,'CNY')}}
                                    <small class="unit">CNY</small>
                                </td>
                            </tr>
                            <tr style="text-align: center;" v-if="buyplan.length==0">
                                <td colspan="6" class="no_date">{:strtoupper(lang('no_data'))}</td>
                            </tr>
                            </tbody>
                        </table>
                        <ul class="pagination" id="pagination_buyplan" v-show="buyplan.length!=0">
                        </ul>
                    </div>
                    <div class="col-md-12 tab-pane" id="co-buy-list">
                        <table class="table table-striped table-hover ntTable">
                            <thead>
                            <tr>
                                <th>No.</th>
                                <th>交货</th>
                                <th>箱数</th>
                                <th>体积/重量</th>
                                <th>金额</th>
                                <th>签约</th>
                                <th>收货</th>
                                <th>编辑</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr v-for="(item,index) in buylist">
                                <td align="center"><a href="#">{{formatUnit(item.id,'ID')}}</a></td>
                                <td>
                                    <small>{{item.delivery_date}}</small>
                                    <br>{{item.port_name}}
                                </td>
                                <td>{{formatUnit(item.qty_sum,'CTN')}}
                                    <small class="unit">CTN</small>
                                </td>
                                <td align="right">
                                    {{formatUnit(item.m3_sum,'CBM')}}
                                    <small class="unit">CBM</small>
                                    <br>
                                    {{formatUnit(item.kgs_sum,'KGS')}}
                                    <small class="unit">KGS</small>
                                </td>

                                <td align="right">
                                    {{formatUnit(item.paid_sum,'CNY')}}
                                    <small class="unit">CNY</small>
                                </td>
                                <td align="center">{{item.sign_day>0?'O':'-'}}</td>
                                <td align="center">{{item.receipt_day>0?'O':'-'}}</td>
                                <td>{{item.updatename}}<br>
                                    <small>{{item.update_date}}</small>
                                </td>
                                <td align="right">
                                    <button @click="buypro(item.id)" class="btn btn-sm btn-primary" data-toggle="modal"
                                            data-target="#buy_detailModal">详情
                                    </button>
                                </td>
                            </tr>
                            <tr style="text-align: center;" v-if="buylist.length==0">
                                <td colspan="9" class="no_date">{:strtoupper(lang('no_data'))}</td>
                            </tr>
                            </tbody>
                        </table>
                        <ul class="pagination" id="pagination_buylist" v-show="buylist.length!=0">
                        </ul>
                    </div>
                </div>
            </div>
            <!-- 销售订单页面 -->
            <div class="row tab-pane" id="co-sale" style="padding-top: 0.5rem">
                <div class="col-md-12">
                    <ul class="nav nav-tabs">
                        <li class="active" @click="getdatapage('sale','salepage','saleSize')">
                            <a href="#co-sale-pro" data-toggle="tab">产品</a>
                        </li>
                        <li @click="getdatapage('buypo','buypopage','pageSize')">
                            <a href="#co-sale-list" data-toggle="tab">合同</a>
                        </li>
                    </ul>
                </div>
                <div class="col-md-12">
                    <div class="tab-content">
                        <!-- 销售记录 产品列表 -->
                        <div class="tab-pane active" id="co-sale-pro">
                            <table class="table table-hover table-striped ntTable">
                                <thead>

                                <tr>
                                    <th>产品</th>
                                    <th v-for="item in sale" :key="item.id">{{formatUnit(item.id,'ID')}}</th>
                                    <th>合计</th>
                                </tr>
                                <tr>
                                    <th></th>
                                    <th v-for="item in sale" :key="item.id">{{item.create_date}}</th>
                                    <th></th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr v-for="(item ,index) in prodata" :key="item.id">
                                    <td>
                                        <div class="pro">
                                            <div class="pro-icon">
                                                <img :src="item.prodata.img_url" border="0" width="48px"
                                                     height="48px">
                                            </div>
                                            <div class="pro-name">
                                                <small> {{formatUnit(item.prodata.prochar_id,'ID') + (item.prodata.brand_name ? ' / '+item.prodata.brand_name :'')+ (item.prodata.model ? ' / '+item.prodata.model :'')}}
                                                </small>
                                                <br>
                                                {{item.prodata.pro_name}}
                                            </div>
                                        </div>
                                    </td>

                                    <td align="right" v-for="item in item.prosum">{{item.qty}}<br><span class="blue">{{item.price}}</span></td>
                                    <td align="right">{{formatUnit(item.sumqty,'PCS')}}<br><span class="blue">{{formatUnit(item.sumprice,'CNY')}}</span></td>
                                </tr>
                                <tr style="text-align: center;" v-if="sale.length==0">
                                    <td colspan="10" class="no_date">{:strtoupper(lang('no_data'))}</td>
                                </tr>
                                </tbody>
                            </table>
                            <ul class="pagination" id="pagination_sale" v-show="sale.length!=0">
                            </ul>
                        </div>
                        <!-- 销售记录 合同列表 -->
                        <div class="tab-pane" id="co-sale-list">
                            <table class="table table-hover table-striped ntTable">
                                <thead>
                                <tr>
                                    <th>合同号</th>
                                    <th>日期</th>
                                    <th>金额</th>
                                    <th>折扣</th>
                                    <th>费用</th>
                                    <th>应付</th>
                                    <th>已付</th>
                                    <th>毛利率</th>
                                    <th>业务员</th>
                                    <th>创建</th>
                                    <th>编辑</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr v-for="(item ,index) in buypo" :key="item.id">
                                    <td>{{formatUnit(item.id,'ID')}}</td>
                                    <td>{{item.finish_date}}</td>
                                    <td align="right">{{formatUnit(item.total,'BRL')}}<small class="unit">BRL</small></td>
                                    <td align="right">
                                        {{formatUnit(item.discount,'BRL')}} <small class="unit">BRL</small><br>
                                        {{formatUnit(item.discount/item.total*100,'%')}}<small class="unit">%</small>
                                    </td>
                                    <td align="right"> {{formatUnit(item.cost,'BRL')}}<small class="unit">BRL</small></td>
                                    <td align="right"> {{formatUnit(item.pay,'BRL')}}<small class="unit">BRL</small></td>
                                    <td align="right">
                                        {{formatUnit(item.paid,'BRL')}}<small class="unit">BRL</small><br>
                                        {{formatUnit(item.paid/item.pay*100,'%')}}<small class="unit">%</small>
                                    </td>
                                    <td align="right">
                                        {{formatUnit(item.profit,'BRL')}}<small class="unit">BRL</small><br>
                                        {{formatUnit(item.profit/(item.total-item.discount)*100,'%')}}<small class="unit">%</small>
                                    </td>
                                    <td>{{item.saler_name}}</td>
                                    <td>{{item.create_name}}<br><small>{{item.create_date}}</small></td>
                                    <td>{{item.update_name}}<br><small>{{item.update_date}}</small></td>
                                </tr>
                                <tr style="text-align: center;" v-if="sale.length==0">
                                    <td colspan="11" class="no_date">{:strtoupper(lang('no_data'))}</td>
                                </tr>
                                </tbody>
                            </table>
                            <ul class="pagination" id="pagination_buypo" v-show="buypo.length!=0">
                            </ul>
                        </div>

                    </div>
                </div>
            </div>

            <!-- 财务流水账目页面 -->
            <div class="row tab-pane" id="co-finance">
                <div class="col-md-12">
                    <h3 class="text-center">
                        待补充-财务流水账目页面
                    </h3>
                </div>
            </div>
            <!-- 操作记录页面 -->
            <div class="row tab-pane" id="co-log">
                <div class="col-md-12">
                    <h3 class="text-center">
                        待补充-操作记录页面
                    </h3>
                </div>
            </div>
        </div>
    </div>
    <!-- 联系人添加 弹窗部分-->
    <div class="modal fade" id="linkman_Modal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabe1"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:60%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="ntModalLabel">{$companyname}&nbsp;{:strtoupper(lang('add/alterar_contact'))}</h4>
                </div>
                <div class="modal-body">
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <p></p>
                            </div>
                            <table class="table table-striped table-hover ntTable">
                                <tbody>
                                <tr>
                                    <td>{:strtoupper(lang('names'))}<span class="required"></span></td>
                                    <td colspan="3">
                                        <div class="input-group" style="width:100%">
                                            <input type="text" class="form-control" v-model="linkdata.name">
                                            <span class="input-group-addon">
                                               <input type="checkbox" v-model="linkdata.is_main" value="1"> {:strtoupper(lang('main'))}
                                            </span>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('job'))}<span class="required"></span></td>
                                    <td><input type="text" class="form-control" v-model="linkdata.position"></td>
                                    <td>{:strtoupper(lang('gender'))}<span class="required"></span></td>
                                    <td>
                                        <label class="radio-inline">
                                            <input type="radio" name="sex" v-model="linkdata.sex" value="1" checked>{:lang('man')}
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="sex" v-model="linkdata.sex" value="0">{:lang('woman')}
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('contact_information'))}<span class="required"></span></td>
                                    <td colspan="3">
                                        <div class="input-group" style="width:100%">
                                            <div class="input-group-btn" style="width: 150px;">
                                                <select name="" id="sellinkfun" class="form-control"
                                                        v-model="linkdata.linkfunid">
                                                    <option value="" selected>{:lang('please_select')}</option>
                                                    <option :value="item.id" v-for="(item,index) in linkfun">
                                                        {{item.content}}
                                                    </option>
                                                </select>
                                            </div>
                                            <input type="text" class="form-control" v-model="linkdata.linkval">
                                            <div class="input-group-btn">
                                                <button type="button" class="btn btn-primary" @click="addlinkmethod">
                                                    <span class="glyphicon glyphicon-plus"> </span>
                                                    {:strtoupper(lang('add'))}
                                                </button>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <table class="table table-striped table-hover ntTable">
                                <thead>
                                <tr>
                                    <th>{:strtoupper(lang('type'))}</th>
                                    <th>{:strtoupper(lang('content'))}</th>
                                    <th>{:strtoupper(lang('operate'))}</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr v-for="(item,index) in linkdata.linkarr">
                                    <td>{{item.linkname}}</td>
                                    <td>{{item.content}}</td>
                                    <td class="text-right">
                                        <div class="btn-group">
                                            <button type="button" class="btn btn-default"
                                                    @click="editlinkfun(index)"><span
                                                    class="glyphicon glyphicon-pencil"></span>{:strtoupper(lang('edit'))}
                                            </button>
                                            <button type="button" class="btn btn-default"
                                                    @click="dellinkitem(index)"><span
                                                    class="glyphicon glyphicon-trash"></span>{:strtoupper(lang('delete'))}
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span
                            class="glyphicon glyphicon-remove"></span>{:strtoupper(lang('cancel'))}
                    </button>
                    <button @click="addlinkdata" :disabled="islinkman" type="button" class="btn btn-primary"
                            style="padding-left:24px;padding-right:24px"><span
                            class="glyphicon glyphicon-floppy-disk"></span>{:strtoupper(lang('save'))}
                    </button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    <!-- 银行添加 弹窗部分-->
    <div class="modal fade" id="bank_Modal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabe3"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:60%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="ntModalLabe3">{$companyname}&nbsp;{:strtoupper(lang('add/alterar_bank_account'))}</h4>
                </div>
                <div class="modal-body">
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <p></p>
                            </div>
                            <table class="table table-striped table-hover ntTable">
                                <tbody>
                                <tr>
                                    <td>{:strtoupper(lang('bank'))}<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="bankdata.banks_id">
                                            <option value="">{:lang('please_select')}</option>
                                            <option v-for="(item,index) in banklist" :value="item.id">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('account_opening_bank_branch'))}<span class="required"></span>
                                    </td>
                                    <td><input type="text" class="form-control" v-model="bankdata.bankname"></td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('account_name'))}<span class="required"></span></td>
                                    <td>
                                        <input type="text" class="form-control" v-model="bankdata.account_name">
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('account'))}<span class="required"></span></td>
                                    <td colspan="3">
                                        <div class="input-group" style="width:100%">
                                            <input type="text" class="form-control" v-model="bankdata.account_num">
                                            <span class="input-group-addon">
                                                <input type="checkbox" v-model="bankdata.is_main" value="1"> {:strtoupper(lang('main'))}
                                            </span>
                                        </div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span
                            class="glyphicon glyphicon-remove"></span>{:strtoupper(lang('cancel'))}
                    </button>
                    <button type="button" @click="addbankdata" :disabled="isbank" class="btn btn-primary"
                            style="padding-left:24px;padding-right:24px"><span
                            class="glyphicon glyphicon-floppy-disk"></span>{:strtoupper(lang('save'))}
                    </button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    <!-- 分公司添加 弹窗部分-->
    <div class="modal fade" id="branch_editModal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel5"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:70%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="ntModalLabel5">{$companyname}&nbsp; 分公司添加/更改</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <p></p>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <table class="table">
                                <tbody>
                                <tr>
                                    <td>名称<span class="required"></span></td>
                                    <td colspan="4">
                                        <input type="text" class="form-control" v-model="branchdata.name">
                                    </td>
                                    <td align="right">
                                        <button @click="lockbut" class="btn btn-default btn-checkbox"
                                                style="width:10rem">
                                            <input type="checkbox" v-model="branchdata.lock" value="0"> 锁定
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <!--有国家id的话就不显示国家-->
                                    <td v-if="{$country_id}==''">国家<span class="required"></span></td>
                                    <td v-if="{$country_id}==''">
                                        <select class="form-control col-md-2" v-model="branchdata.country_id"
                                                @change="selchangebranchfun('provinces',branchdata.country_id)">
                                            <option selected value="">{:lang('please_select')}</option>
                                            <option :value="item.id" v-for="(item,index) in countryname">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                    <td>省份<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="branchdata.province_id"
                                                @change="selchangebranchfun('city',branchdata.province_id)">
                                            <option selected value="">{:lang('please_select')}</option>
                                            <option :value="item.id" v-for="(item,index) in branchdata.provinces">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                    <td>城市<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="branchdata.city_id"
                                                @change="selchangebranchfun('town',branchdata.city_id)">
                                            <option selected value="">{:lang('please_select')}</option>
                                            <option :value="item.id" v-for="(item,index) in branchdata.city">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                    <td>乡镇<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="branchdata.town_id">
                                            <option selected value="">{:lang('please_select')}</option>
                                            <option :value="item.id" v-for="(item,index) in branchdata.town">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>地址<span class="required"></span></td>
                                    <td colspan="5"><input type="text" class="form-control" v-model="branchdata.addr">
                                    </td>
                                </tr>
                                <tr>
                                    <td>邮编</td>
                                    <td>
                                        <input type="text" class="form-control" v-model="branchdata.zipcode">
                                    </td>
                                    <td>员工数量<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="branchdata.works">
                                            <option value="">{:lang('please_select')}</option>
                                            <option :value="key" v-for="(item,key,index) in number">
                                                {{item}}
                                            </option>
                                        </select>
                                    </td>
                                    <td>营业号</td>
                                    <td><input type="text" class="form-control" v-model="branchdata.regno"></td>
                                </tr>
                                <tr>

                                    <td>税号</td>
                                    <td><input type="text" class="form-control" v-model="branchdata.taxno"></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        <span class="glyphicon glyphicon-remove"></span>取消
                    </button>
                    <button @click="addbranchdata" :disabled="isbranch" type="button" class="btn btn-primary"
                            style="padding-left:24px;padding-right:24px">
                        <span class="glyphicon glyphicon-floppy-disk"></span>保存
                    </button>
                </div>
            </div>
        </div>
    </div>
    <!-- 风评 弹窗部分-->
    <div class="modal fade" id="co_evaluate_Modal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel7"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:70%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="ntModalLabel7">{$companyname}&nbsp;风评添加/更改</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <p></p>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-1">
                            评价 <span class="required"></span>
                        </div>
                        <div class="col-md-9">
                            <textarea class="form-control" style="height: 10rem"
                                      v-model="evaluatedata.comment"></textarea>

                        </div>
                        <div class="col-md-2">
                            <select name="" id="" class="form-control" v-model="evaluatedata.score">
                                <option value="0">没有评分</option>
                                <option value="1">1（差）</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5（普通）</option>
                                <option value="6">6</option>
                                <option value="7">7（好）</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10（优）</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        <span class="glyphicon glyphicon-remove"></span>取消
                    </button>
                    <button @click="addevaluatedata" :disabled="isevaluate" type="button" class="btn btn-primary"
                            style="padding-left:24px;padding-right:24px">
                        <span class="glyphicon glyphicon-floppy-disk"></span>保存
                    </button>
                </div>
            </div>
        </div>
    </div>
    <!-- 销售资料调整 弹窗部分-->
    <div class="modal fade" id="co_sale_settingModal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel4"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:70%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="ntModalLabel4">公司(8888/华为巴西分公司) / 销售资料调整</h4>
                </div>
                <div class="modal-body">
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <p></p>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-6">
                            <table class="table">
                                <tbody>
                                <tr>
                                    <td>默认送货类型</td>
                                    <td>允许支付类型</td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="radio" name="delivery-type" value="1"
                                               v-model="adjustdata.delivery_id"> 自取 <br>
                                        <input type="radio" name="delivery-type" value="2"
                                               v-model="adjustdata.delivery_id"> 送货上门（本区） <br>
                                        <input type="radio" name="delivery-type" value="3"
                                               v-model="adjustdata.delivery_id"> 送货上门（本市） <br>
                                        <input type="radio" name="delivery-type" value="4"
                                               v-model="adjustdata.delivery_id"> 物流派货 <br>
                                    </td>
                                    <td>
                                        <input type="checkbox" name="pay-type" value="1"
                                               v-model="adjustdata.pay_type_ids"> 现金 <span
                                            class="label label-warning">{{numfail.one==0?'-':numfail.one}}</span><br>
                                        <input type="checkbox" name="pay-type" value="2"
                                               v-model="adjustdata.pay_type_ids"> 代金券<span
                                            class="label label-warning">{{numfail.two==0?'-':numfail.two}}</span><br>
                                        <input type="checkbox" name="pay-type" value="3"
                                               v-model="adjustdata.pay_type_ids"> 现金支票 <span
                                            class="label label-warning">{{numfail.three==0?'-':numfail.three}}</span><br>
                                        <input type="checkbox" name="pay-type" value="4"
                                               v-model="adjustdata.pay_type_ids"> 期票 <span
                                            class="label label-warning">{{numfail.four==0?'-':numfail.four}}</span><br>
                                        <input type="checkbox" name="pay-type" value="5"
                                               v-model="adjustdata.pay_type_ids"> 转账 <span
                                            class="label label-warning">{{numfail.five==0?'-':numfail.five}}</span><br>
                                        <input type="checkbox" name="pay-type" value="6"
                                               v-model="adjustdata.pay_type_ids"> 银行单 <span
                                            class="label label-warning">{{numfail.six==0?'-':numfail.six}}</span><br>
                                        <input type="checkbox" name="pay-type" value="7"
                                               v-model="adjustdata.pay_type_ids"> 期账 <span
                                            class="label label-warning">{{numfail.seven==0?'-':numfail.seven}}</span><br>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="col-md-6">
                            <table class="table">
                                <tbody>
                                <tr>
                                    <td colspan="3">
                                        <button class="btn btn-default" @click="makefirstpledge('pledge')">
                                            <input type="checkbox" name="pledge" v-model="adjustdata.pledge"> 必须支付定金
                                        </button>
                                        <button class="btn btn-default" @click="makefirstpledge('makefirst')">
                                            <input type="checkbox" name="makefirst" v-model="adjustdata.makefirst">
                                            允许先配货后结算
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>管理员授权额度</td>
                                    <td colspan="2"><input type="number" min="1" class="form-control text-right"
                                                           v-model="credit4admin" value="">
                                    </td>
                                </tr>
                                <tr>
                                    <td>订单额度</td>
                                    <td align="right">{{formatUnit(adjustdata.credit4order,'BRL')}}
                                        <small class="unit">BRL</small>
                                    </td>
                                    <td align="center"> {{adjustdata.update_date}}</td>
                                </tr>
                                <tr v-for="item in credit4admindata">
                                    <td>{{item.adminname}}</td>
                                    <td align="right">{{formatUnit(item.point,'BRL')}}
                                        <small class="unit">BRL</small>
                                    </td>
                                    <td align="center"> {{item.update_date}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        <span class="glyphicon glyphicon-remove"></span>取消
                    </button>
                    <button type="button" class="btn btn-primary" :disabled="isdisadble" @click="saveadjust"
                            style="padding-left:24px;padding-right:24px">
                        <span class="glyphicon glyphicon-floppy-disk"></span>保存
                    </button>
                </div>
            </div>
        </div>
    </div>
    <!--销售订单合同详情-->
    <div class="modal fade" id="buy_detailModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:60%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title">采购内容详情</h4>
                </div>
                <div class="modal-body">
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <h4> 信息框 </h4>
                            </div>
                            <table class="table table-striped table-hover ntTable">
                                <tbody>
                                <tr>
                                    <td>合同号</td>
                                    <td><a href="buy.detail.php" target="_blank">{{formatUnit(buyid,'ID')}}</a></td>
                                    <td>公司名称</td>
                                    <td>{$companyname}</td>
                                </tr>
                                </tbody>
                            </table>
                            <table class="table table-striped table-hover iTable ntTable">
                                <thead>
                                <tr>
                                    <th>#</th>
                                    <th>产品</th>
                                    <th>箱规</th>
                                    <th>数量</th>
                                    <th>金额</th>
                                    <th>备注</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr v-for="(item ,index) in packdata" :key="item.id">
                                    <td align="center"></td>
                                    <td>
                                        <div class="pro">
                                            <div class="pro-icon">
                                                <img :src="item.prodata.img_url" border="0" width="48px"
                                                     height="48px">
                                            </div>
                                            <div class="pro-name">
                                                <small> {{formatUnit(item.prodata.prochar_id,'ID') +
                                                    (item.prodata.brand_name ? ' / '+item.prodata.brand_name :'')+
                                                    (item.prodata.model ? ' / '+item.prodata.model :'')}}
                                                </small>
                                                <br>
                                                {{item.prodata.pro_name}}
                                            </div>
                                        </div>
                                    </td>
                                    <td align="right">
                                        {{item.prodata.prochar_qty}}
                                        <small class="unit">PCS/CTN</small>
                                        | {{formatUnit(item.ctn_kgs,'KGS')}}
                                        <small class="unit">KGS/CTN</small>
                                        <br>
                                        {{item.ctn_size}}
                                        <small class="unit">CM</small>
                                        | {{formatUnit(item.ctn_m3,'CBM')}}
                                        <small class="unit">CBM</small>
                                    </td>
                                    <td align="right">{{item.qty*item.ctn_qty}}
                                        <small class="unit">PCS</small>
                                    </td>
                                    <td align="right">
                                        {{formatUnit(item.price,'CNY')}}
                                        <small class="unit">CNY</small>
                                        <br>
                                        {{formatUnit(item.price*item.qty*item.ctn_qty,'CNY')}}
                                        <small class="unit">CNY</small>
                                    </td>
                                    <td>{{item.content}}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span
                            class="glyphicon glyphicon-remove"></span>取消
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<!--弹窗部分 结束-->
<script src="/static/Admin/js/companydetail.js"></script>
{include file="public/foot"/}